<div class="page animated bounceInDown">

<Widget:show title="模型" col="12">
<Widget:action id="modelObj-action" title="">
    <a grid-btn grid-delete class="btn disabled btn-danger btn-sm" href="{$delUrl}">删除</a>
    <a grid-btn grid-dialog class="btn btn-primary disabled btn-sm" href="{$editUrl}">修改</a>
    <a grid-dialog class="btn btn-primary btn-sm" href="{$addUrl}">新增</a>
</Widget:action>
<div class="table-responsive">
    <table id="modelObj" class="table table-bordered table-striped table-hover">
        <thead>
            <th w_index="name">模型名称</th>
            <th w_index="title">显示标题</th>
            <th w_render="type">类型</th>
            <th w_render="is_nav">导航显示</th>
            <th w_index="intro">备注</th>
        </thead>
    </table>
</div>
<div id="modelObj-pager" class="widget-footer"></div>
</Widget:show>


<include file="table" url="0" table="modelObj" rows="100" />

<include file="AcField/index" />

</div>

<script type="text/javascript">
    
function is_nav(record, rowIndex, colIndex, options) {
    var is_nav = modelObj.getRecordIndexValue(record, 'is_nav');
    if (is_nav) {
        return "显示";
    }else{
        return "不显示";
    }

} 

function type(record, rowIndex, colIndex, options) {
    var type = modelObj.getRecordIndexValue(record, 'type');
    if (type == 'dic') {
        return "字典";
    }else if (type == 'artice'){
        return "文章";
    }else if (type == 'class') {
        return "分类";
    }else if (type == 'news') {
        return "图文";
    }else if (type == 'album') {
        return "相册";
    }

} 
</script>

